1. Field of the Invention
The present invention relates to a color conversion method and a color conversion apparatus used for performing a given color coordinate conversion or color conversion within real time in response to input of color image signals or color video signals, such as for color scanners, color cameras, color hardcopy apparatuses, color displays, color television cameras, color recognizer, video editors and color printers that require high-speed color masking and correction.
2. Description of the Related Art
Conventionally, table look-up methods using three-dimensional interpolation have been proposed as methods for performing various kinds of complicated color signal conversions with facility at high speed. In these methods, as the three-dimensional interpolation, a color space is divided into a plurality of unit interpolation solid groups, a unit interpolation solid including an input color is selected, and using the output values at a plurality of vertices of the unit interpolation unit, a given color conversion is interpolated over the entire color space with continuity being ensured. At present, the following interpolations are known, in all of which the color space is divided into a plurality of unit solid groups: an eight-point interpolation in which the vertices of a solid are used as they are; a six-point interpolation in which the solid groups are divided into two triangular prism groups; a four-point interpolation in which a solid is divided into five or six tetrahedron groups (Japanese Published Patent Application No. Sho 58-16180); and a five-point interpolation in which a solid is divided into square pyramids.
Of these, interpolations proposed as color conversion apparatuses include a triangular prism interpolation method in which a YCrCb lightness and color difference space is divided into triangular prisms with the principal axis being set in the Y direction and the other two axes being set within the color difference plane to perform interpolation. This method can effectively be used for input color spaces of lightness and color difference spaces (Japanese Published Patent Application No. Hei 8-14843).
Another proposed interpolation is an oblique triangular prism interpolation method. With this method, for color space inputs of three primary colors, the generation of xe2x80x9cripplesxe2x80x9d in the MIN calculation frequently used in color conversions can completely be avoided in all the directions in the input color space irrespective of the achromatic direction. Therefore, a color conversion apparatus that switches between the triangular prism interpolation method and the oblique triangular prism interpolation method with facility has been proposed (Japanese Laid-open Patent Application No. Hei 8-98046) in order to compensate for defects of the triangular prism interpolation method for the inputs of the three primary colors. This will be referred to as a first prior art.
The triangular prism interpolation method and the oblique triangular prism interpolation method are very high in general versatility for the following reason: Since the number of vertices is the same in these interpolation methods, the color conversion table memories can have the same structure and can easily be switched with a common control line, so that both lightness and color difference signal inputs and three primary color inputs can effectively be handled, enabling the provision of a color conversion being effective for all the color space inputs. However, to perform the oblique triangular prism interpolation, it is necessary to provide a table memory other than the table memory for the input color space, which results in an increased number of memories.
To solve this problem, a method has been proposed in which a circuit that performs extrapolation by use of the data at the endmost point for the inputs other than the input color space is added (Japanese Laid-open Patent Application No. Hei 9-69961). This will be referred to as a second prior art.
The first prior art in which color conversion is efficiently performed on the input color signals of lightness and chromaticity, or the three primary colors or tristimulus values faces the following problem: In the first prior art, it is necessary to provide a color conversion table for the output values at lattice points outside the input color space, which results in an increased memory scale. For example, when it is intended to divide the input color space into unit rectangular solids of oblique triangular prisms as shown in FIG. 6, since a rectangular solid of an oblique triangular prism cannot be formed on the outermost surface in the X-Y direction, lattice points outside the input color space are provided and an interpolation calculation of the outermost surface of the input color space is performed. This results in an increased number of lattice points. Reference numerals M0 to M5 represent color conversion table memories, which are sectioned as shown in FIG. 6(a). FIG. 6(b) shows the X-Z plane. FIG. 6(c) shows the X-Y plane. FIG. 6(d) shows unit interpolation rectangular solids of oblique triangular prisms with points a, b, c, d, e, f and g as the lattice points. Since the unit interpolation rectangular solids include three of the above-mentioned unit solids, a CRAM setting area shown by the dotted lines is necessary for the input color space shown by the black solid lines shown in FIGS. 6(b) and 6(c).
The second prior art faces the following problem: To solve the problem of the first prior art, the second prior art is intended for avoiding the increase in the number of color conversion table memories by extrapolating the output values at the lattice points outside the input color space from the output values at the lattice points within the input color space. Although the increase in the number of color conversion memories can surely be avoided, the ensuring of continuity, which should be an essential purpose, cannot be achieved on the outermost surface of the input color space in interpolating a given color conversion over the entire color space by use of the output values at a plurality of vertices of the unit interpolation solid with continuity being ensured. This is because it is difficult to consider that effective color conversion means can always be established for a given color conversion since hardware is used to handle re-use of outermost surface data.
An object of the present invention is to provide a color conversion method and a color conversion apparatus in which for input color signals of, for example, lightness and chromaticity, or the three primary colors or the tristimulus values, an efficient color conversion table memory is used for a high-speed and high-precision color conversion and by use of the output values at a plurality of vertices of a unit interpolation solid, a given color conversion is interpolated over the entire color space with continuity being ensured to thereby eliminate the necessity for a color conversion table other than the color conversion table for the input color space.
A color conversion method of the present invention is a color conversion method in which an input color space is divided into unit solids, lattice point data constituting the unit solids are stored in a three-dimensional color conversion table memory, and an interpolation calculation is performed by use of the color conversion table memory for performing a color conversion of a color image signal expressed by various color signals, wherein lattice point data used for a first interpolation method using a smaller amount of lattice point data for the color conversion is a subset of lattice point data used for a second interpolation method using a larger amount of lattice point data for the color conversion, and the first or the second interpolation method is selected to perform the color conversion.
According to the color conversion method of the present invention, for input color signals of, for example, lightness and chromaticity, or the three primary colors or the tristimulus values, an efficient color conversion table memory is used for a high-speed and high-precision color conversion and by use of the output values at a plurality of vertices of a unit interpolation solid, a given color conversion is interpolated over the entire color space with continuity being ensured to thereby eliminate the necessity for a color conversion table other than the color conversion table for the input color space. Therefore, compared to the conventional methods, excellent cost performance is realized.
Moreover, a color conversion apparatus of the prevent invention comprises: an image input portion for separating a color image signal expressed by various color signals into a higher-order bit part and a lower-order bit part; a weight generator for generating, by use of the lower-order bit part, interpolation weight coefficients corresponding to a given solid and a divisional solid obtained by dividing the given solid; a determiner for choosing between the given solid and the divisional solid based on magnitudes of the interpolation weight coefficients; an address generator for generating a color conversion table memory address to be accessed, based on the higher-order bit part and an output of the determiner; a color conversion table memory in which output values at lattice points of an input color signal are stored and divided into a predetermined number of groups; a selector for, from the lattice point outputs stored in the color conversion table memory, selecting a plurality of lattice point outputs when an interpolation method of the given solid is used, and selecting an applicable lattice point output from a plurality of lattice points when an interpolation method of the divisional solid is used; and an interpolation calculator for interpolating the output value read out from the color conversion table memory by use of the interpolation weight coefficient, wherein the following switchings are performed with a common control signal: whether the selector outputs vertex data of the given solid or vertex data of the divisional solid; whether the weight generator outputs the interpolation weight coefficient corresponding to the given solid or the interpolation weight coefficient corresponding to the divisional solid; and whether the interpolation calculator performs an interpolation of the given solid or an interpolation of the divisional solid.
Moreover, a color conversion apparatus of the present invention comprises: an image input portion for separating a color image signal expressed by various color signals into a higher-order bit part and a lower-order bit part; a weight generator for generating interpolation weight coefficients corresponding to a triangular prism and a tetrahedron by use of the lower-order bit part; a determiner for choosing between the triangular prism and the tetrahedron based on magnitudes of the interpolation weight coefficients; an address generator for generating a color conversion table memory address to be accessed, based on the higher-order bit part and an output of the determiner; a color conversion table memory in which output values at lattice points of an input color signal are stored and divided into six groups; a selector for, from the lattice point outputs stored in the color conversion table memory, selecting six points when a triangular prism interpolation method is used and selecting four points of the six points when a tetrahedron interpolation method is used; and an interpolation calculator for interpolating the output value read out from the color conversion table memory by use of the interpolation weight coefficient, wherein the following switchings are made with a common control signal: whether the selector outputs vertex data of the tetrahedron or vertex data of the triangular prism; whether the weight generator outputs the interpolation weight coefficient corresponding to the tetrahedron or the interpolation weight coefficient corresponding to the triangular prism; and whether the interpolation calculator performs a triangular prism interpolation or a tetrahedron interpolation.